<?php
include($_SERVER['DOCUMENT_ROOT']."/inc/Function_index.php");
$psize = 15;
$page = isset($_GET['page'])?intval($_GET['page']):1;
$cid = isset($_GET['cid'])?intval($_GET['cid']):0;
$list = newslist($page,$psize,$cid);
$num = newslistnum($cid);
$menu = menulist();
$info = menuinfo($cid);
if($list){
    $msg = 1;
}else{
    $msg = 0;
}
$page1 = page1($num,$psize,$page);
$tpl->assign('info',$info);
$tpl->assign('results',$results);
$tpl->assign("menu",$menu);
$tpl->assign("nlist",$list);
$tpl->assign("msg",$msg);
$tpl->assign("cid",$cid);
$tpl->assign("page",$page1);
$tpl->show("newslist");
?>